package cn.tedu.csmall.business.rabbit;

import cn.tedu.csmall.commons.pojo.order.model.Order;
import com.fasterxml.jackson.databind.ObjectReader;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
@RabbitListener(queues = {RabbitMQConfig.BUSINESS_QUEUE})
public class RabbitConsumer {

    @RabbitHandler
    public void rabbitReceive(Order order){
        System.out.println("接收到消息为:"+order);
    }



}
